package hanshunping.project.tankWar;

public class Shot implements Runnable{
    int x;
    int y;
    boolean live = true;
    int speed=5;

    public Shot(int x, int y, int speed) {
        this.x = x;
        this.y = y;
        this.speed = speed;
    }


    @Override
    public void run() {
        while (true){
            x+=speed;
            try {
                Thread.sleep(50);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            if(!(x<=1000)){
                live = false;
                break;
            }
        }
    }
}


class EnemyBullet{
    int x;
    int y;
    boolean live = true;
    int speed=5;
    public EnemyBullet(int x, int y, int speed) {
        this.x = x;
        this.y = y;
        this.speed = speed;
    }
}